import { computed } from 'vue'
import type { TableColumnsType } from 'ant-design-vue'
import type { Notification } from '@/types/api/notification'

/**
 * 通知管理表格列配置
 */
export const useTableColumns = () => {
  const { t } = useI18n()
  
  return computed<TableColumnsType<Notification>>(() => [
    {
      title: t('notification.title'),
      dataIndex: 'title',
      key: 'title',
      width: 200,
      ellipsis: true
    },
    {
      title: t('notification.type'),
      dataIndex: 'type',
      key: 'type',
      width: 50
    },
    {
      title: t('notification.level'),
      dataIndex: 'level',
      key: 'level',
      width: 50
    },
    {
      title: t('notification.status'),
      dataIndex: 'status',
      key: 'status',
      width: 80
    },
    {
      title: t('notification.sender'),
      dataIndex: 'senderName',
      key: 'sender',
      width: 100
    },
    {
      title: t('notification.createTime'),
      dataIndex: 'createTime',
      key: 'createTime',
      width: 180
    },
    {
      title: t('common.action'),
      key: 'action',
      width: 220,
      fixed: 'right'
    }
  ])
} 